//
//  AdvertisementApi.swift
//  FeastBooking
//
//  Created by Imon on 2017/10/2.
//  Copyright © 2017年 Imon. All rights reserved.
//

import Foundation
import Moya

enum AdvertisementApi {
    case getAdvertisements()
}

extension AdvertisementApi: TargetType {
    
    var baseURL: URL {
        return URL(string: serverBasePath)!
    }
    
    var path: String {
        return "/advertisements"
    }
    
    var method: Moya.Method {
        return .get
    }
    
    var parameters: [String: Any]? {
        return nil
    }
    
    var task: Task {
        return .request
    }
    
    var sampleData: Data {
        return "{\"data\":{\"msg\":\"good\"},\"meta\":{\"status\":200,\"msg\":\"OK\"}}".data(using: String.Encoding.utf8)!
    }
    
    var parameterEncoding: ParameterEncoding {
        return URLEncoding.default
    }
}
